<html>
    <head>
        <title>Leaflet TimeDimension</title>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.7.1/dist/leaflet.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.fullscreen/1.4.2/Control.FullScreen.min.css">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet-velocity@1.9.0/dist/leaflet-velocity.min.css" />
        <link rel="stylesheet" href="../src/leaflet.timedimension.control.css" />
        <link rel="stylesheet" href="css/style.css" />
        <style>
        .leaflet-container {
            background: #091926;
        }
        </style>
    </head>
    <body>
        <div class="container">
            <div id="header">
                <h1>Leaflet TimeDimension example 18</h1>
                <h2>Integration with leaflet-velocity</h2>
            </div>
            <div id="map" class="map radar dark-background"></div>
            <h2>Information</h2>
            <div class="information">
                <p><a href="https://github.com/danwild/leaflet-velocity">leaflet-velocity</a> is a plugin for Leaflet that creates a
                    canvas visualisation layer for direction and intensity of arbitrary velocities.
                    In this example, we are using <a href="http://api.socib.es/home/">SOCIB Data API</a> to get
                    the values of sea water velocity measured by a High Frequency Radar (HFR) to feed a
                    leaflet-velocity layer that is updated on every time change.
                </p>
                <p>This example use an extra Leaflet.TimeDimension class: <a
                        href="js/extras/leaflet.timedimension.velocitylayer.js">L.TimeDimension.Layer.VelocityLayer</a>.</p>
            </div>

            <h2>Code</h2>
            <pre><code class="javascript" id="code"></code></pre>

            <div class="prev-example">
                <a href="example16.html">Example 17: Basic GeoJSON usage</a>
            </div>
            <div class="next-example">
                <a href="index.html">Index</a>
            </div>
            <div id="footer">
                <a class="leaflet-timedimension" href="index.html">Leaflet.TimeDimension examples</a>
                <a class="github" href="https://github.com/socib/Leaflet.TimeDimension" title="Fork Leaflet.TimeDimension at GitHub!"><span>Fork Leaflet.TimeDimension at GitHub</span></a>
            </div>
        </div>
        <script src="https://npmcdn.com/leaflet@1.7.1/dist/leaflet.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.fullscreen/1.4.2/Control.FullScreen.min.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/leaflet.nontiledlayer@1.0.7/dist/NonTiledLayer.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/leaflet-velocity@1.9.0/dist/leaflet-velocity.min.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/iso8601-js-period@0.2.1/iso8601.min.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/dateformat@3.0.3/lib/dateformat.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>

        <script type="text/javascript" src="../src/leaflet.timedimension.js"></script>
        <script type="text/javascript" src="../src/leaflet.timedimension.util.js"></script>
        <script type="text/javascript" src="../src/leaflet.timedimension.layer.js"></script>
        <script type="text/javascript" src="../src/leaflet.timedimension.layer.wms.js"></script>
        <script type="text/javascript" src="../src/leaflet.timedimension.layer.geojson.js"></script>
        <script type="text/javascript" src="../src/leaflet.timedimension.player.js"></script>
        <script type="text/javascript" src="../src/leaflet.timedimension.control.js"></script>
        <script type="text/javascript" src="js/extras/leaflet.timedimension.velocitylayer.js"></script>
        <script type="text/javascript" src="js/baselayers.js"></script>
        <script type="text/javascript" src="js/example18.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
        <script type="text/javascript">
            var oReq = new XMLHttpRequest();
            oReq.addEventListener("load", (function(xhr) {
                var code = xhr.currentTarget.response;
                var codeBlock = document.getElementById("code");
                codeBlock.innerText = code;
                hljs.highlightBlock(codeBlock);
            }));
            oReq.open("GET", "js/example18.js");
            oReq.send();
        </script>
    </body>
</html>
